package su.security.service;

import java.util.List;

import net.kuakao.core.dto.PagerDTO;
import su.security.entity.SecurityUser;

/**
 * 
 * 
 * @author sushimeng
 * 
 */
public interface SecurityUserService {

	//-----------
	public List<SecurityUser> queryByPage(PagerDTO s);
	public SecurityUser getBaseinfo(int id);
	/**
	 * 用户登录验证，成功则返回用户对象，失败则返回null
	 * @param username
	 * @param userpwd 用户输入密码
	 * @return
	 */
	public SecurityUser login(String username,String userpwd);
	/**
	 * 判断用户是否可以访问url
	 * @param userId
	 * @param url
	 * @return
	 */
	public boolean urlCanDo(int userId,String url);
	//-----------
	public void save(SecurityUser o)throws Exception;
	public void remove(int id)throws Exception;
	/**
	 * 用户修改密码
	 * @param username
	 * @param userpwd
	 * @param newpwd
	 * @return
	 */
	public void updatePwd(String username,String userpwd,String newpwd)throws Exception;
	/**
	 * 重置密码
	 * @param userpwd
	 * @param userId
	 * @return
	 */
	public void operateResetPwd(String userpwd,int userId)throws Exception;

}